package com.gewe.wxChat.service.impl;

import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.gewe.wxChat.model.dto.MemberInfoDto;
import com.gewe.wxChat.model.entity.WxMember;
import com.gewe.wxChat.service.WxMemberService;
import com.gewe.wxChat.mapper.WxMemberMapper;
import org.apache.commons.collections4.CollectionUtils;
import org.springframework.stereotype.Service;

import java.util.List;
import java.util.Map;

/**
 * @author 86182
 * @description 针对表【wx_member(微信群成员表)】的数据库操作Service实现
 * @createDate 2024-10-15 23:04:27
 */
@Service
public class WxMemberServiceImpl extends ServiceImpl<WxMemberMapper, WxMember>
        implements WxMemberService {

    @Override
    public void saveMemberByWxIdAndChatRoomId(List<WxMember> wxMembers) {
        if (CollectionUtils.isEmpty(wxMembers) || wxMembers.size() == 0) {
            return;
        }
        this.baseMapper.saveMemberByWxIdAndChatRoomId(wxMembers);
    }

    @Override
    public MemberInfoDto getIfnfo(String wxId, String chatRoomId) {
        return this.baseMapper.getIfnfo(wxId,chatRoomId);
    }
}




